/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/jiangjin/jiangjinryxxb/page',
    method: 'get',
    params: query
  })
}
//系数详细配置分页展示
export function fetchListXsXxPz(query,deptId) {
  return request({
    url: '/jiangjin/jiangjinryxxb/page/xsXxPz/' + deptId,
    method: 'get',
    params: query
  })
}

export function ControlPageOne(query) {
  return request({
    url: '/jiangjin/jiangjinryxxb/ControlPageOne',
    method: 'get',
    params: query
  })
}
export function ControlPage(query) {
  return request({
    url: '/jiangjin/jiangjinryxxb/ControlPage',
    method: 'get',
    params: query
  })
}

export function getJiangjinRyxxbPerPage(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/RyxxbPerPage',
    headers: {
      post:{
        "Content-Type":"applicationb/json"
      }
    },
    method: 'post',
    data: obj
  })
}



export function addObj(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/jiangjin/jiangjinryxxb/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/jiangjin/jiangjinryxxb/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb',
    method: 'put',
    data: obj
  })
}


/**
 * 获取分组人员列表
 * @param id
 * @returns {*}
 */
export function fetchListfy(deptId, param) {
  return request({
    url: '/jiangjin/jiangjinryxxb/pagefy/'+deptId,
    method: 'get',
    params: param
  })
}


/**
 * 获取人员列表
 * @param codeIds
 * @returns {*}
 */
export function fetchListfyByCode(codeIds) {
  return request({
    url: '/jiangjin/jiangjinryxxb/pagefyByCode/'+codeIds,
    method: 'get'
  })
}


export function delRyListObj(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/delRyxxbList',
    method: 'post',
    data: obj
  })
}

//查询本部门
export function getRyxxList() {
  return request({
    url: '/jiangjin/jiangjinryxxb/getRyxxList',
    method: 'get'
  })
}
// 查询所有
export function getJJRyxxbList() {
  return request({
    url: '/jiangjin/jiangjinryxxb/getJJRyxxbList',
    method: 'get'
  })
}


export function updateRyxxbList(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/updateRyxxbList',
    method: 'post',
    data: obj
  })
}

export function saveAllRyxxbList(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/saveAllRyxxbList',
    method: 'post',
    data: obj
  })
}



export function saveRyxxbList(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/saveRyxxbList',
    method: 'post',
    data: obj
  })
}

//系数配置_个人
export function allocationRyxxb(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/allocationRyxxb',
    method: 'put',
    data: obj
  })
}
//系数配置_分组
export function allocationRyxxbFz(obj,fzId) {
  return request({
    url: '/jiangjin/jiangjinryxxb/allocationRyxxbFz/' + fzId,
    method: 'put',
    data: obj
  })
}
//系数配置_全部
export function allocationRyxxbQb(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/allocationRyxxbQb',
    method: 'put',
    data: obj
  })
}
//详细系数配置
export function allocationRyxxbXxPz(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/allocationRyxxbXxPz',
    method: 'put',
    data: obj
  })
}

export function getRyxxbByCode(code) {
  return request({
    url: '/jiangjin/jiangjinryxxb/getRyxxbByCode/' +code,
    method: 'get'
  })
}
export function getRyxxbListByConfig(code,config03) {
  return request({
    url: '/jiangjin/jiangjinryxxb/getRyxxbListByConfig/' +code+'/'+config03,
    method: 'get'
  })
}

//配置导入
export function allocationRyxxbJcPzDr(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/allocationRyxxbJcPzDr',
    method: 'post',
    data: obj
  })
}

//人员分组-配置导出
export function ryxxByJjDeptId(id) {
  return request({
    url: '/jiangjin/jiangjinryxxb/ryxxByJjDeptId/' + id,
    method: 'get'
  })
}

//获取人员角色列表
export function getOperRoles(userName) {
  return request({
    url: '/jiangjin/jiangjinryxxb/getRoleList/' + userName,
    method: 'get'
  })
}

//系数详细配置分页展示
export function fetchListXsXxPzRyxx(query,ryCodes) {
  return request({
    url: '/jiangjin/jiangjinryxxb/page/' + ryCodes,
    method: 'get',
    params: query
  })
}
//查询奖金表用户信息
export function getRyxxListPermissionNone() {
  return request({
    url: '/jiangjin/jiangjinryxxb/getRyxxListPermissionNone',
    method: 'get'
  })
}

export function gethzzqList() {
  return request({
    url: '/jiangjin/jiangjinryxxb/gethzzqList',
    method: 'get'
  })
}

//
export function getRyxxDataListBypfhz(hzzqid) {
  return request({
    url: '/jiangjin/jiangjinryxxb/getRyxxDataListBypfhz/' + hzzqid,
    method: 'get',
  })
}

export function updateOrSavedatalist(obj) {
  return request({
    url: '/jiangjin/jiangjinryxxb/updateOrSavedatalist',
    method: 'post',
    data: obj
  })
}
